package com.gluck.cases.core.block;

import com.github.pagehelper.PageInfo;
import com.gluck.cases.core.modal.dto.CasesRecordDTO;
import com.gluck.cases.core.modal.entity.CasesRecord;

import java.util.List;

/**
 * @ClassName CasesRecordBlock
 * @Desc TODO
 * @Author shiyongzhe
 * @Date 2022/5/28 - 10:10 下午
 **/
public interface CasesRecordBlock {

    int insert(CasesRecordDTO dto);

    int delete(Long id);

    /**
     * 功能描述: 根据操作人员查询测试records
     *
     * @Params [userId]
     * @Return java.util.List<com.gluck.cases.core.modal.entity.CasesRecord>
     * @Author I`m Gluck
     * @Date 2022/5/31
     */
    PageInfo<CasesRecordDTO> queryRecordsByUserId(Long userId, Integer startPage, Integer endPage);

    /**
     * 功能描述: 根据用户username查询测试records
     *
     * @Params [epid]
     * @Return java.util.List<com.gluck.cases.core.modal.entity.CasesRecord>
     * @Author I`m Gluck
     * @Date 2022/5/31
     */
    PageInfo<CasesRecordDTO> queryRecordsByUsername(String username, Integer startPage, Integer endPage);

    boolean batchDeleteByUserId(Long userId);

    boolean batchDeleteByUsername(String username);
}
